home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / AIncludes / ToolUtils.a < prev    next >
Encoding:
Text File  |  1994-04-07  |  41.8 KB  |  1,160 lines  |  [TEXT/MPS ]

  1. ;    File:        ToolUtils.a
  2. ;
  3. ;    Copyright:    © 1983-1993 by Apple Computer, Inc.
  4. ;                All rights reserved.
  5. ;
  6. ;    Version:    System 7.1• for ETO #13
  7. ;    Created:    Tuesday, March 30, 1993 18:00
  8. ;    Modified:    Tue, Nov 30, 1993 11:08:59
  9. ;
  10. ;___________________________________________________________________________
  11.  
  12.     IF &TYPE('__INCLUDINGTOOLUTILS__') = 'UNDEFINED' THEN
  13. __INCLUDINGTOOLUTILS__    SET    1
  14.  
  15.     IF &TYPE('__INCLUDINGQUICKDRAW__') = 'UNDEFINED' THEN
  16.  INCLUDE 'QuickDraw.a'
  17.     ENDIF
  18.  
  19.                   IF          (&TYPE('wholeTools') = 'UNDEFINED') THEN
  20. wholeTools        EQU         1
  21.                   ENDIF
  22.  
  23.  
  24. ;+ Resource Manager
  25.  
  26. ; Resource attributes
  27.  
  28. resSysRef         EQU         7                         ; reference to system/local reference
  29. resSysHeap        EQU         6                         ; In system/in application heap
  30. resPurgeable      EQU         5                         ; Purgeable/not purgeable
  31. resLocked         EQU         4                         ; Locked/not locked
  32. resProtected      EQU         3                         ; Protected/not protected
  33. resPreload        EQU         2                         ; Read in at OpenResource?
  34. resChanged        EQU         1                         ; Existing resource changed since last update
  35. rcbMask           EQU         $FD                       ; Must preserve ResChanged over _ResAttrs
  36.  
  37. ; Map attributes
  38.  
  39. mapReadOnly       EQU         7                         ; is this file read-only?
  40. mapCompact        EQU         6                         ; Is a compact necessary?
  41. mapChanged        EQU         5                         ; Is it necessary to write map?
  42.  
  43. ; Resource Manager Globals
  44.  
  45. TopMapHndl        EQU         $A50                      ; topmost map in list [handle]
  46. SysMapHndl        EQU         $A54                      ; system map [handle]
  47. SysMap            EQU         $A58                      ; reference number of system map [word]
  48. CurMap            EQU         $A5A                      ; reference number of current map [word]
  49. ResReadOnly       EQU         $A5C                      ; Read only flag [word]
  50. ResLoad           EQU         $A5E                      ; Auto-load feature [word]
  51. ResErr            EQU         $A60                      ; Resource error code [word]
  52. ResErrProc        EQU         $AF2                      ; Resource error procedure [pointer]
  53. SysResName        EQU         $AD8                      ; Name of system resource file [STRING[19]]
  54.  
  55. ;new Resource Manager stuff
  56.  
  57. RomMapInsert      EQU         $B9E                      ; (byte) determines if we should link in map
  58. TmpResLoad        EQU         $B9F                      ; second byte is temporary ResLoad value.
  59.  
  60. ; the following word values are to be placed into the
  61. ; word located at RomMapInsert
  62.  
  63. MapTrue           EQU         $FFFF                     ; link in ROM map with resload true 
  64. MapFalse          EQU         $FF00                     ; link in ROM map with resload false
  65.  
  66. ;+ Font Manager
  67.  
  68.  
  69. ; Standard font ID's
  70.  
  71. sysFont           EQU         0                         ; system font ID
  72. applFont          EQU         1                         ; application font ID
  73. newYork           EQU         2                         ; standard release fonts
  74. geneva            EQU         3
  75. monaco            EQU         4
  76. venice            EQU         5
  77. london            EQU         6
  78. athens            EQU         7
  79. sanFran           EQU         8
  80. toronto           EQU         9
  81. cairo             EQU         11
  82. losAngeles        EQU         12
  83. times             EQU         20
  84. helvetica         EQU         21
  85. courier           EQU         22
  86. symbol            EQU         23
  87. mobile            EQU         24
  88.  
  89. ; Font Manager Globals
  90.  
  91. ApFontID          EQU         $984                      ; resource ID of application font [word]
  92. FMDefaultSize     EQU         $987                      ; default size [byte]
  93. CurFMInput        EQU         $988                      ; quickdraw FMInput Record [pointer]
  94. FMgrOutRec        EQU         $998                      ; quickdraw FontOutput Record [pointer]
  95. FScaleDisable     EQU         $A63                      ; disable font scaling? [byte]
  96.  
  97. ;new FONT manager stuff
  98.  
  99. WidthListHand     EQU         $8E4                      ; list of extra width tables, or nil.
  100. WidthPtr          EQU         $B10                      ; (long) Font Mgr global
  101. WidthTabHandle    EQU         $B2A                      ; Font width table handle for measure
  102. LastSPExtra       EQU         $B4C                      ; (long) most recent value of space extra
  103. SysFontFam        EQU         $BA6                      ; (word) System font family ID or zero
  104. SysFontSize       EQU         $BA8                      ; (word) System font size (or zero for 12 pt)
  105. FDevDisable       EQU         $BB3                      ; (byte) $FF to disable device-defined style extra
  106. LastFOND          EQU         $BC2                      ; (long) handle of last font def record
  107. FONDID            EQU         $BC6                      ; (word) ID of last font def record
  108. FractEnable       EQU         $BF4                      ; (byte) flag for fractional font widths
  109. UsedFWidths       EQU         $BF5                      ; (byte) flag saying if we used fract widths
  110. FScaleHFact       EQU         $BF6                      ; (long) horz. font scale factor
  111. FScaleVFact       EQU         $BFA                      ; (long) vertical font scale factor 
  112.  
  113. ;+ Window Manager
  114.  
  115. ; system windows have negative kinds
  116. dialogKind        EQU         2                         ; dialog windows
  117. userKind          EQU         8                         ; this and above numbers are for user
  118.  
  119. ; Values returned by window definition function's hit routine
  120.  
  121. wNoHit            EQU         0                         ; not in window at all
  122. wInContent        EQU         1                         ; in content area
  123. wInDrag           EQU         2                         ; in drag area
  124. wInGrow           EQU         3                         ; in grow area
  125. wInGoAway         EQU         4                         ; in go away area
  126. wInZoomIn         EQU         5                         ; in zoom in
  127. wInZoomOut        EQU         6                         ; in zoom out
  128.  
  129. ; FindWindow Return Codes
  130.  
  131. inDesk            EQU         0                         ; not in any window
  132. inMenuBar         EQU         1                         ; in the menu bar
  133. inSysWindow       EQU         2                         ; in a system window
  134. inContent         EQU         3                         ; in content area of user window
  135. inDrag            EQU         4                         ; in drag area of user window
  136. inGrow            EQU         5                         ; in grow area of user window
  137. inGoAway          EQU         6                         ; in go away area of user window
  138. inZoomIn          EQU         7                         ; in zoom in part code
  139. inZoomOut         EQU         8                         ; in zoom out part code
  140.  
  141. ; Resource ID's for windows
  142.  
  143. deskPatID         EQU         16                        ; desk pattern PAT ID
  144. documentProc      EQU         0                         ; standard document WDEF ID
  145. dBoxProc          EQU         1                         ; dialog box (document without titleBar) WDEF ID
  146. plainDBox         EQU         2                         ; no border WDEF ID
  147. altDBoxProc       EQU         3                         ; no shadow or title WDEF ID
  148. noGrowDocProc     EQU         4                         ; no grow area WDEF ID
  149. movableDBoxProc    EQU            5                        ; movable dialog box WDEF ID
  150. zoomDocProc       EQU         8                         ; with zoom box WDEF ID
  151. zoomNoGrow        EQU         12                        ; zoom with no grow box WDEF ID
  152. rDocProc          EQU         16                        ; document with rounded corners WDEF ID
  153.  
  154. ; Window Data Structure Definition
  155.  
  156. windowPort        EQU         0                         ; grafPort [108 bytes]
  157. windowKind        EQU         $6C                       ; type of window [word]
  158. wVisible          EQU         $6E                       ; visible flag [byte]
  159. wHilited          EQU         $6F                       ; select (hilite) flag [byte]
  160. wGoAway           EQU         $70                       ; has go away button [byte]
  161. wZoom             EQU         $71                       ; has zoom box [byte]
  162. structRgn         EQU         $72                       ; structure region of window [Handle]
  163. contRgn           EQU         $76                       ; content region of window [Handle]
  164. updateRgn         EQU         $7A                       ; update region of window [Handle]
  165. windowDef         EQU         $7E                       ; window definition procedure [Handle]
  166. wDataHandle       EQU         $82                       ; window proc-defined data [Handle]
  167. wTitleHandle      EQU         $86                       ; title string [Handle]
  168. wTitleWidth       EQU         $8A                       ; width in pixels of title string [word]
  169. wControlList      EQU         $8C                       ; control list of this window [handle]
  170. nextWindow        EQU         $90                       ; next window in z-ordered list [pointer]
  171. windowPic         EQU         $94                       ; picture handle for updates [handle]
  172. wRefCon           EQU         $98                       ; application use [long]
  173. windowSize        EQU         $9C                       ; size of window data structure
  174. WStateData        RECORD      0
  175. userState         DS.L        2                         ;Rect
  176. stdState          DS.L        2                         ;Rect
  177.                   ENDR
  178.  
  179. WindowRecord    RECORD  0
  180. port            DS      GrafPort
  181. windowKind      DS.W    1    ; short
  182. visible         DS.B    1    ; Boolean
  183. hilited         DS.B    1    ; Boolean
  184. goAwayFlag      DS.B    1    ; Boolean
  185. spareFlag       DS.B    1    ; Boolean
  186. strucRgn        DS.L    1    ; RgnHandle
  187. contRgn         DS.L    1    ; RgnHandle
  188. updateRgn       DS.L    1    ; RgnHandle
  189. windowDefProc   DS.L    1    ; Handle
  190. dataHandle      DS.L    1    ; Handle
  191. titleHandle     DS.L    1    ; StringHandle
  192. titleWidth      DS.W    1    ; short
  193. controlList     DS.L    1    ; ControlHandle
  194. nextWindow      DS.L    1    ; WindowPeek
  195. windowPic       DS.L    1    ; PicHandle
  196. refCon          DS.L    1    ; long
  197. size            EQU     *
  198.                 ENDR
  199.  
  200.  
  201.  
  202. ; Window Manager Globals
  203.  
  204. WindowList        EQU         $9D6                      ; Z-ordered linked list of windows [pointer]
  205. PaintWhite        EQU         $9DC                      ; erase newly drawn windows? [word]
  206. WMgrPort          EQU         $9DE                      ; window manager's grafport [pointer]
  207. GrayRgn           EQU         $9EE                      ; rounded gray desk region [handle]
  208. CurActivate       EQU         $A64                      ; window slated for activate event [pointer]
  209. CurDeactive       EQU         $A68                      ; window slated for deactivate event [pointer]
  210. DragHook          EQU         $9F6                      ; user hook during dragging [pointer]
  211. DeskPattern       EQU         $A3C                      ; desk pattern [8 bytes]
  212. DeskHook          EQU         $A6C                      ; hook for painting the desk [pointer]
  213. GhostWindow       EQU         $A84                      ; window hidden from FrontWindow [pointer]
  214.  
  215.  
  216.  
  217. ;+ Menu Manager
  218.  
  219. ; "ASCII" marks for menu characters
  220.  
  221. noMark            EQU         0
  222. commandMark       EQU         $11                       ; command fan (cloverleaf)
  223. checkMark         EQU         $12                       ; check mark for menus
  224. diamondMark       EQU         $13                       ; diamond mark for menus
  225. appleMark         EQU         $14                       ; desk ornament menu title
  226.  
  227. ; MenuList Data Structure Definition -- one per menuBar
  228.  
  229. ; 6 Byte header
  230. lastMenu          EQU         0                         ; number of bytes in this menuList [word]
  231. lastRight         EQU         2                         ; h coordinate of 1st free point in menuBar [word]
  232. ; one of the following per menu
  233. menuoH            EQU         0                         ; menu handle [handle]
  234. menuLeft          EQU         4                         ; coordinate of left edge of menu [word]
  235.  
  236. ; MenuInfo Data Structure -- one per menu
  237.  
  238. menuID            EQU         0                         ; unique ID for each menuBar [word]
  239. menuWidth         EQU         2                         ; menu width [word]
  240. menuHeight        EQU         4                         ; menu height [word]
  241. menuDefHandle     EQU         6                         ; menu definition proc [handle]
  242. menuEnable        EQU         $A                        ; enable flags, one bit/item [long]
  243. menuData          EQU         $E                        ; menu item string [STRING]
  244. menuBlkSize       EQU         $E                        ; size of a menu block plus dataString
  245.  
  246. ; MenuString Data Structure -- one per menu item
  247.  
  248. itemIcon          EQU         0                         ; icon byte
  249. itemCmd           EQU         1                         ; apple (command key) byte
  250. itemMark          EQU         2                         ; checkmark character byte
  251. itemStyle         EQU         3                         ; style byte
  252.  
  253. ; Menu Manager Globals
  254.  
  255. MenuList          EQU         $A1C                      ; current menuBar list structure [handle]
  256. MenuFlash         EQU         $A24                      ; flash feedback count [word]
  257. MenuHook          EQU         $A30                      ; user hook during menuSelect [pointer]
  258. MBarEnable        EQU         $A20                      ; menuBar enable for desk accessories[word]
  259. MBarHook          EQU         $A2C                      ; user hook during menuSelect [pointer]
  260.  
  261. ;new Menu Manager stuff
  262.  
  263. MBarHeight        EQU         $BAA                      ; (word) height of menu bar (usually 20)
  264.  
  265. ;+ Control Manager
  266.  
  267. ; Part Codes
  268.  
  269. inButton          EQU         10                        ; in a push button
  270. inCheckBox        EQU         11                        ; in a checkBox button
  271. inUpButton        EQU         20                        ; in up button area of a dial
  272. inDownButton      EQU         21                        ; in down button area of a dial
  273. inPageUp          EQU         22                        ; in page up (gray) area of a dial
  274. inPageDown        EQU         23                        ; in page down (gray) area of a dial
  275. inThumb           EQU         129                       ; in thumb area of a dial
  276.  
  277. ; Constants for axis parameter of DragGrayRgn and DragControl
  278.  
  279. noConstraint      EQU         0                         ; free form dragging
  280. hAxisOnly         EQU         1                         ; horizontally only
  281. vAxisOnly         EQU         2                         ; vertically only
  282.  
  283. ; Resource ID's for controls
  284.  
  285. pushButProc       EQU         0                         ; rounded-corner pushButtons CDEF ID
  286. checkBoxProc      EQU         1                         ; check-box type buttons CDEF ID
  287. radioButProc      EQU         2                         ; radio buttons CDEF ID
  288. scrollBarProc     EQU         16                        ; scrollBar CDEF ID
  289. useWFont          EQU         8                         ; add this to get window font CDEF ID
  290. sBarPatID         EQU         17                        ; scrollBar pattern ID
  291.  
  292.  
  293. ; Popup Control Constants 
  294. popupMenuCDEFproc        EQU    1008                    ; popup menu CDEF ID
  295.  
  296. ; Popup Variation Codes 
  297. popupFixedWidth            EQU    $0001                    ; size will not vary with menu items
  298. popupReserved            EQU    $0002                    ; was popupUseCQD
  299. popupUseAddResMenu        EQU    $0004                    ; menu = AddResMenu(CNTL's refCon)
  300. popupUseWFont            EQU    $0008                    ; use this for window font/size/face
  301.  
  302. ; Popup Title characteristics
  303. popupTitleBold            EQU    $00000100                ; styles for the popup title
  304. popupTitleItalic        EQU    $00000200
  305. popupTitleUnderline        EQU    $00000400
  306. popupTitleOutline        EQU    $00000800
  307. popupTitleShadow        EQU    $00001000
  308. popupTitleCondense        EQU    $00002000
  309. popupTitleExtend        EQU    $00004000
  310. popupTitleNoStyle        EQU    $00008000
  311.  
  312. popupTitleLeftJust        EQU    $00000000                ; justification for the title
  313. popupTitleCenterJust    EQU    $00000001
  314. popupTitleRightJust        EQU    $000000FF
  315.  
  316.  
  317. ; Control Template
  318.  
  319. nextControl       EQU         $0                        ; next control in the list [handle]
  320. contrlOwner       EQU         $4                        ; owning window [pointer]
  321. contrlRect        EQU         $8                        ; bounding rectangle [8 bytes]
  322. contrlVis         EQU         $10                       ; visible state [byte]
  323. contrlHilite      EQU         $11                       ; hilite state [byte]
  324. contrlValue       EQU         $12                       ; current value of control [word]
  325. contrlMin         EQU         $14                       ; minimum value of control [word]
  326. contrlMax         EQU         $16                       ; maximum value of control [word]
  327. contrlDefHandle   EQU         $18                       ; control definition procedure [handle]
  328. contrlData        EQU         $1C                       ; data for definition proc [handle]
  329. contrlAction      EQU         $20                       ; local actionProc [pointer]
  330. contrlRFcon       EQU         $24                       ; refcon defined by application [long]
  331. contrlTitle       EQU         $28                       ; title string [STRING]
  332. contrlSize        EQU         $28                       ; size of control data structure less title
  333.  
  334. ; Control Manager Globals
  335.  
  336. DragPattern       EQU         $A34                      ; DragTheRgn pattern [8 bytes]
  337. DragFlag          EQU         $A44                      ; implicit parameter to DragControl [word]
  338. CurDragAction     EQU         $A46                      ; implicit actionProc for dragControl [pointer]
  339.  
  340.  
  341. ;+ Text Edit
  342.  
  343.  
  344. ; Justification styles
  345.  
  346. teJustLeft        EQU         0                         ; left justified text
  347. teJustRight       EQU         -1                        ; right justified text
  348. teJustCenter      EQU         1                         ; center justified text
  349. teForceLeft       EQU         -2                        ; for Arabic fonts, force left justification
  350.  
  351. ; new names for the Justification styles
  352. teFlushDefault    EQU            0                        ; flush according to the line direction
  353. teCenter        EQU            1                        ; center justify
  354. teFlushRight    EQU            -1                        ; flush right for all scripts
  355. teFlushLeft        EQU            -2                        ; flush left for all scripts
  356.  
  357. ; Text Edit Record
  358.  
  359. teDestRect        EQU         $0                        ; destination rectangle [8 bytes]
  360. teViewRect        EQU         $8                        ; view rectangle rectangle [8 bytes]
  361. teSelRect         EQU         $10                       ; select rectangle [8 bytes]
  362. teLineHite        EQU         $18                       ; lineheight [word]
  363. teAscent          EQU         $1A                       ; first baseline offset [word]
  364. teSelPoint        EQU         $1C                       ; selection point [long]
  365. teSelStart        EQU         $20                       ; selection start [word]
  366. teSelEnd          EQU         $22                       ; selection end [word]
  367. teActive          EQU         $24                       ; active [byte]
  368. teWordBreak       EQU         $26                       ; word break routine [pointer]
  369. teClikProc        EQU         $2A                       ; click loop routine [pointer]
  370. teClikTime        EQU         $2E                       ; time of last click [long]
  371. teClikLoc         EQU         $32                       ; location of double click [long]
  372. teCarTime         EQU         $34                       ; time for next caret toggle [long]
  373. teCarOn           EQU         $38                       ; is caret on? [byte]
  374. teCarAct          EQU         $39                       ; is caret active? [byte]
  375. teJust            EQU         $3A                       ; fill style [word]
  376. teLength          EQU         $3C                       ; length of text below [word]
  377. teTextH           EQU         $3E                       ; text [handle]
  378. teRecBack         EQU         $42                       ; unused [word]
  379. teRecLine         EQU         $44                       ; unused [word]
  380. teLftClick        EQU         $46                       ; click was to left? [byte]
  381. teLftCaret        EQU         $47                       ; caret was to left? [byte]
  382. teCROnly          EQU         $48                       ; <CR> only for line breaks? [byte]
  383. teFontStuff       EQU         $4A                       ; space for font specifier [8 bytes]
  384. teFont            EQU         $4A                       ; text font [word]
  385. teFace            EQU         $4C                       ; text face [word]
  386. teMode            EQU         $4E                       ; text mode [word]
  387. teSize            EQU         $50                       ; text size [word]
  388. teGrafPort        EQU         $52                       ; grafport for editting [pointer]
  389. teHiHook          EQU         $56                       ; hook for hilite routine [pointer]
  390. teCarHook         EQU         $5A                       ; hook for hilite routine [pointer]
  391. teNLines          EQU         $5E                       ; number of lines [word]
  392. teLines           EQU         $60                       ; line starts [words...]
  393. teRecSize         EQU         $68                       ; base size of a record w/o lines
  394.  
  395. ; Text Edit Globals
  396.  
  397. TEDoText          EQU         $A70                      ; textEdit doText proc hook [pointer]
  398. TERecal           EQU         $A74                      ; textEdit recalText proc hook [pointer]
  399. TEScrpLength      EQU         $AB0                      ; textEdit Scrap Length [word]
  400. TEScrpHandle      EQU         $AB4                      ; textEdit Scrap [handle]
  401. TEWdBreak         EQU         $AF6                      ; default word break routine [pointer]
  402. TEFindWord        EQU            $7F8                    ; low-memory hook for TextEdit's FindWord routine
  403.  
  404. ;new TE stuff
  405.  
  406. WordRedraw        EQU         $BA5                      ; (byte) - used by TextEdit RecalDraw
  407. TESysJust         EQU         $BAC                      ; (word) system justification (intl. textEdit)
  408. TEFlags           EQU         teRecBack                 ; turn whole byte into bit flags
  409. teFAutoPos        EQU         6                         ; set this bit for auto position/scroll
  410.  
  411. ;+ Dialog Manager
  412.  
  413. ; Item codes in item list
  414.  
  415. userItem          EQU         0                         ; application-defined (dialog only)
  416. ctrlItem          EQU         4                         ; must be added to following four items
  417. btnCtrl           EQU         0                         ; standard button
  418. chkCtrl           EQU         1                         ; standard check box
  419. radCtrl           EQU         2                         ; standard radio button
  420. resCtrl           EQU         3                         ; control defined in resource file
  421. statText          EQU         8                         ; static text
  422. editText          EQU         16                        ; editable text (dialog only)
  423. iconItem          EQU         32                        ; icon
  424. picItem           EQU         64                        ; quickdraw picture
  425. itemDisable       EQU         128                       ; add to any of above to disable
  426.  
  427.  
  428. ; Generic buttons
  429.  
  430. okButton          EQU         1                         ; OK button
  431. cancelButton      EQU         2                         ; Cancel button
  432.  
  433. ; Alert/Dialog Resource ID's
  434.  
  435. stopIcon          EQU         0                         ; stop icon ID
  436. noteIcon          EQU         1                         ; note icon ID
  437. cautionIcon       EQU         2                         ; caution icon ID
  438.  
  439. ; Dialog Template
  440.  
  441. dBounds           EQU         $0                        ; dialog bounds rectangle
  442. dWindProc         EQU         $8                        ; window proc ID
  443. dVisible          EQU         $A                        ; visible flag
  444. dGoAway           EQU         $C                        ; go away flag
  445. dRefCon           EQU         $E                        ; reference constant
  446. dItems            EQU         $12                       ; item list ID and handle
  447. dTitle            EQU         $14                       ; dialog window title
  448.  
  449. ; Alert Template
  450.  
  451. aBounds           EQU         $0                        ; alert box height and width
  452. aItems            EQU         $8                        ; item list ID
  453. aStages           EQU         $A                        ; stages word
  454.  
  455. ; Dialog/Alert Window Record
  456.  
  457. DialogRecord    RECORD        0
  458. window            DS            WindowRecord
  459. items            DS.L        1    ;Handle
  460. textH            DS.L        1    ;TEHandle
  461. editField        DS.W        1    ;short
  462. editOpen        DS.W        1    ;short
  463. aDefItem        DS.W        1    ;short
  464. size            equ            *
  465.                 ENDR
  466.  
  467. dWindow           EQU         $0                        ; window record
  468. items             EQU         $9C                       ; Item list [handle]
  469. teHandle          EQU         $A0                       ; textEdit object [handle]
  470. editField         EQU         $A4                       ; current field being edited [word]
  471. editOpen          EQU         $A6                       ; is editting open? [word]
  472. aDefItem          EQU         $A8                       ; default item for alerts [word]
  473. dWindLen          EQU         $AA                       ; dialog record length
  474.  
  475. ; In each item
  476.  
  477. itmHndl           EQU         0                         ; handle to the item
  478. itmRect           EQU         $4                        ; bounding rect of item
  479. itmType           EQU         $C                        ; item type
  480. itmData           EQU         $D                        ; item string, must be even length
  481.  
  482. ; Dialog Manager Globals
  483.  
  484. ANumber           EQU         $A98                      ; active alert ID [word]
  485. ACount            EQU         $A9A                      ; # times this alert called [word]
  486. DABeeper          EQU         $A9C                      ; beep routine [pointer]
  487. DAStrings         EQU         $AA0                      ; paramText substutution strings [4 handles]
  488. DlgFont           EQU         $AFA                      ; default dialog font ID [word]
  489.  
  490.  
  491. ;+ Package Globals
  492.  
  493.  
  494. AppPacks          EQU         $AB8                      ; packages' code [8 handles]
  495.  
  496.  
  497. ;+ Finder related Globals
  498.  
  499.  
  500. FinderName        EQU         $2E0                      ; "Finder" name [STRING[15]]
  501. AppParmHandle     EQU         $AEC                      ; handle to hold application parameters
  502.  
  503.  
  504. ;+ Miscellaneous Globals
  505.  
  506.  
  507. ApplScratch       EQU         $A78                      ; application scratch area [12 Bytes]
  508. ToolScratch       EQU         $9CE                      ; scratch area [8 bytes]
  509. TempRect          EQU         $9FA                      ; scratch rectangle [8 bytes]
  510.  
  511. ; System Patterns
  512.  
  513. sysPatListID      EQU         0                         ; ID of PAT# which contains 38 patterns
  514.  
  515.                   IF          wholeTools THEN
  516.  
  517. ; Resource Manager
  518.  
  519. mCCMask           EQU         $60                       ; mapCompact + mapChanged
  520. mChMask           EQU         $20                       ; mapChanged
  521. mCoMask           EQU         $40                       ; mapCompact
  522.  
  523. ; Font Manager
  524.  
  525. ; Font header values
  526.  
  527. propFont          EQU         $9000                     ; proportional font type
  528. prpFntH           EQU         $9001                     ; with height table
  529. prpFntW           EQU         $9002                     ; with width table
  530. prpFntHW          EQU         $9003                     ; with height & width table
  531. fixedFont         EQU         $B000                     ; fixed-pitch font type
  532. fxdFntH           EQU         $B001                     ; with height table
  533. fxdFntW           EQU         $B002                     ; with width table
  534. fxdFntHW          EQU         $B003                     ; with height & width table
  535. fontWid           EQU         $ACB0                     ; width-only font type
  536.  
  537. ; control/status codes for linkage w/font manager
  538.  
  539. fMgrCtl1          EQU         8                         ; printer drivers
  540.  
  541. ; Font Header Data Record
  542.  
  543. fFontType         EQU         0                         ; font type [word]
  544. fFirstChar        EQU         2                         ; ASCII code of first char [word]
  545. fLastChar         EQU         4                         ; ASCII code of last char [word]
  546. fWidMax           EQU         6                         ; maximum width of any char in pixels [word]
  547. fKernMax          EQU         8                         ; Negative of maximum character kern [word]
  548. fNDescent         EQU         10                        ; negative of descent [word]
  549. fFRectWidth       EQU         12                        ; width of font rectangle [word]
  550. fFRectHeight      EQU         14                        ; height of font rectangle [word]
  551. fOWTLoc           EQU         16                        ; offset to offset/width table [word]
  552. fAscent           EQU         18                        ; ascent above baseline in pixels [word]
  553. fDescent          EQU         20                        ; descent below baseline in pixels [word]
  554. fLeading          EQU         22                        ; space between lines in pixels [word]
  555. fRowWords         EQU         24                        ; row width of bit image / 2 [word]
  556.  
  557. ; Font Manager Input Record (CurFMInput)
  558.  
  559. fmInFamily        EQU         0                         ; family [word]
  560. fmInSize          EQU         2                         ; size [word]
  561. fmInFace          EQU         4                         ; face [word]
  562. fmInNeedBits      EQU         5                         ; needBits [byte]
  563. fmInDevice        EQU         6                         ; device number [byte]
  564. fmInNumer         EQU         8                         ; numerator of scale [fixed]
  565. fmInDenom         EQU         12                        ; denominator of scale [fixed]
  566.  
  567.  
  568. ; Font Manager Output record (FMgrOutRec)
  569.  
  570. fmOutError        EQU         0                         ; error code [word]
  571. fmOutFontH        EQU         2                         ; the actual font [handle]
  572. fmOutBold         EQU         6                         ; bolding factor [byte]
  573. fmOutItalic       EQU         7                         ; italic factor [byte]
  574. fmOutULOffset     EQU         8                         ; underline offset [byte]
  575. fmOutULShadow     EQU         9                         ; underline halo [byte]
  576. fmOutULThick      EQU         10                        ; underline thickness [byte]
  577. fmOutShadow       EQU         11                        ; shadow factor [byte]
  578. fmOutExtra        EQU         12                        ; extra horizontal width [byte]
  579. fmOutAscent       EQU         13                        ; height above baseline [byte]
  580. fmOutDescent      EQU         14                        ; height below baseline [byte]
  581. fmOutWidMax       EQU         15                        ; maximum width of character [byte]
  582. fmOutLeading      EQU         16                        ; space between lines [byte]
  583. fmOutNumer        EQU         18                        ; point for numerators of scale factor [long]
  584. fmOutDenom        EQU         22                        ; point for denominators of scale factor [long]
  585.  
  586.  
  587. ;WidthTable data structure
  588.  
  589. widTabData        EQU         0                         ;ARRAY[1..256] OF LONGINT character widths
  590. widTabFont        EQU         1024                      ;Handle font record used to build table
  591. widthSExtra       EQU         1028                      ;LONGINT space extra used for table
  592. widthStyle        EQU         1032                      ;LONGINT extra due to style
  593. widthFID          EQU         1036                      ;INTEGER font family ID
  594. widthFSize        EQU         1038                      ;INTEGER font size request
  595. widthFace         EQU         1040                      ;INTEGER style (face) request
  596. widthDevice       EQU         1042                      ;INTEGER device requested
  597. widthVInScale     EQU         1044                      ;FIXED scale factors requested
  598. widthHInScale     EQU         1048                      ;FIXED scale factors requested
  599. widthAFID         EQU         1052                      ;INTEGER actual font family ID for table
  600. widthFHand        EQU         1054                      ;Handle family record used to build up table
  601. widthUsedFam      EQU         1058                      ;BOOLEAN used fixed point family widths
  602. widthAFace        EQU         1059                      ;BYTE actual face produced
  603. widthVOutput      EQU         1060                      ;INTEGER vertical scale output value
  604. widthHOutput      EQU         1062                      ;INTEGER horizontal scale output value
  605. widthVFactor      EQU         1064                      ;INTEGER vertical scale output value
  606. widthHFactor      EQU         1066                      ;INTEGER horizontal scale output value
  607. widthASize        EQU         1068                      ;INTEGER actual size of actual font used
  608. ;widTabSize        EQU         1070                      ;INTEGER total size of table
  609.  
  610. ; Font Family Definition
  611.  
  612. ffFlags           EQU         0                         ; flags for family (word)
  613. ffFamID           EQU         2                         ; family ID number (word)
  614. ffFirst           EQU         4                         ; ASCII code of first character (word)
  615. ffLast            EQU         6                         ; ASCII code of last character (word)
  616. ffAscent          EQU         8                         ; maximum ascent expressed for 1 pt (word)
  617. ffDescent         EQU         10                        ; maximum descent expressed for 1 pt (word)
  618. ffLeading         EQU         12                        ; maximum leading expressed for 1 pt (word)
  619. ffWidMax          EQU         14                        ; maximum widMax expressed for 1 pt (word)
  620. ffWTabOff         EQU         16                        ; offset to width table (long)
  621. ffKernOff         EQU         20                        ; offset to kerning table (long)
  622. ffStylOff         EQU         24                        ; offset to style mapping table (long)
  623. ffStyleOff         EQU         24                        ; offset to style mapping table (long)
  624. ffProperty        EQU         28                        ; style property info (12 words)
  625. ffIntl            EQU         46                        ; reserved for international use (2 words)
  626. ffVersion         EQU         50                        ; FOND version number
  627.  
  628. ; Font Characterization Table
  629.  
  630. dpiVert           EQU         0                         ; vertical dots per inch [word]
  631. dpiHoriz          EQU         2                         ; horizontal dots per inch [word]
  632. boldChr           EQU         4                         ; bold characteristics [3 bytes]
  633. italChr           EQU         7                         ; italic characteristics [3 bytes]
  634. ; unused [3 bytes]
  635. outlineChr        EQU         13                        ; outline characteristics [3 bytes]
  636. shadowChr         EQU         16                        ; shadow characteristics [3 bytes]
  637. condChr           EQU         19                        ; condensed characteristics [3 bytes]
  638. extendChr         EQU         22                        ; extended characteristics [3 bytes]
  639. underChr          EQU         25                        ; underline characteristics [3 bytes]
  640.  
  641. ; Globals
  642.  
  643. CurFMFamily       EQU         $988                      ; current font family
  644. CurFMSize         EQU         $98A                      ; current font size
  645. CurFMFace         EQU         $98C                      ; current font face
  646. CurFMNeedBits     EQU         $98D                      ; boolean specifying whether it needs strike
  647. CurFMDevice       EQU         $98E                      ; current font device
  648. CurFMNumer        EQU         $990                      ; current numerator of scale factor
  649. CurFMDenom        EQU         $994                      ; current denominator of scale factor
  650. FOutRec           EQU         $998                      ; Font Manager output record
  651. FMDotsPerInch     EQU         $9B2                      ; h,v dotsPerInch of current device
  652. FMStyleTab        EQU         $9B6                      ; style heuristic table supplied by device
  653. RomFont0          EQU         $980                      ; system font [handle]
  654. GotStrike         EQU         $986                      ; Do we have the strike? [byte]
  655.  
  656.  
  657. ; Window Manager
  658.  
  659. ; Window Definition Procedure Messages
  660.  
  661. wDrawMsg          EQU         0                         ; draw yourself
  662. wHitMsg           EQU         1                         ; hit test
  663. wCalcRgnMsg       EQU         2                         ; recalculate your regions
  664. wInitMsg          EQU         3                         ; initialize yourself
  665. wDisposeMsg       EQU         4                         ; dispose any private data
  666. wGrowMsg          EQU         5                         ; drag out grow outline
  667. wGIconMsg         EQU         6                         ; draw the grow icon
  668. OldStructure      EQU         $9E6                      ; saved structure region [handle]
  669. OldContent        EQU         $9EA                      ; saved content region [handle]
  670. SaveVisRgn        EQU         $9F2                      ; temporarily saved visRegion [handle]
  671. CurDeKind         EQU         $A22                      ; window kind of deactivated window [word]
  672. SaveUpdate        EQU         $9DA                      ; Enable update accumulation? [word]
  673.  
  674. ; Menu Manager
  675.  
  676. ; Menu Definition Procedure Messages
  677.  
  678. mDrawMsg          EQU         0                         ; draw yourself
  679. mChooseMsg        EQU         1                         ; select an item
  680. mSizeMsg          EQU         2                         ; calculate your size
  681.  
  682. ; Menu Resource IDs
  683.  
  684. textMenuProc      EQU         0                         ; standard text menu MDEF ID
  685. TheMenu           EQU         $A26                      ; ID of hilited menu [word]
  686. SavedHandle       EQU         $A28                      ; saved bits under a menu [handle]
  687.  
  688. ;misc Menu stuff
  689.  
  690. MrMacHook         EQU         $A2C                      ; Mr. Macintosh hook [pointer]
  691.  
  692. ; Control manager
  693.  
  694. ; Control Definition Procedure Messages
  695.  
  696. drawCtlMsg        EQU         0                         ; draw message
  697. hitCtlMsg         EQU         1                         ; hit test message
  698. calcCtlMsg        EQU         2                         ; calc region message
  699. newCtlMsg         EQU         3                         ; init message
  700. dispCtlMsg        EQU         4                         ; dispose any private data message
  701. posCtlMsg         EQU         5                         ; adjust indicator position message
  702. thumbCtlMsg       EQU         6                         ; calculate rectangles for thumb dragging
  703. dragCtlMsg        EQU         7                         ; custom drag message
  704. trackCtlMsg       EQU         8                         ; track yourself message
  705. calcWholeCtlMsg   EQU         10                        ; calc whole region message
  706. calcThumbCtlMsg   EQU         11                        ; calc indicator region message
  707.  
  708. ;stage definition--packed 2 to a byte, 4 stages in a word
  709.  
  710. volBits           EQU         3                         ; number of beeps
  711. alBit             EQU         4                         ; alert bit (put up box this time?)
  712. okDismissal       EQU         8                         ; bit for OK/Cancel default in each stage
  713.  
  714. ; DialogList Data Structure Definitions
  715.  
  716. dlgMaxIndex       EQU         0                         ; maximum index (=items-1) stored here
  717.  
  718.  
  719. SaveProc          EQU         $A90                      ; address of Save failsafe procedure
  720. SaveSP            EQU         $A94                      ; Safe SP for restart or save
  721.  
  722. ; DITLMethod 
  723. overlayDITL         EQU 0
  724. appendDITLRight     EQU 1
  725. appendDITLBottom     EQU 2
  726.  
  727. ; Dialog Selectors
  728. AppendDITL            EQU    $402
  729. CountDITL            EQU    $403
  730. ShortenDITL            EQU    $404
  731.  
  732. ; Package Manager
  733.  
  734. FPState           EQU         $A4A                      ; floating point state [6 bytes]
  735. App2Packs         EQU         $BC8                      ; $BC8-$BE7 eight more package handles
  736.  
  737. ; Resource Manager
  738.  
  739. RMGRPerm          EQU         $BA4                      ; (byte) - permission byte for OpenResFile
  740.  
  741. ; Miscellaneous Constants
  742.  
  743. screenRadius      EQU         $00100010                 ; rounded corners for desk area
  744.  
  745. ; Miscellaneous Globals
  746.  
  747. IconBitmap        EQU         $A0E                      ; bitmap used for plotting things
  748. TaskLock          EQU         $A62                      ; re-entering SystemTask [byte]
  749. CloseOrnHook      EQU         $A88                      ; hook for closing desk ornaments
  750.  
  751. ;new MacApp stuff
  752.  
  753. MAErrProc         EQU         $BE8                      ; (long) MacApp error proc address
  754. MASuperTab        EQU         $BEC                      ; (long) handle to MacApp superclass table
  755.  
  756.  
  757. ;**************** NEW TOOL EQUATES ************
  758.  
  759. ; Font Manager
  760.  
  761. ; addition to FMgrOutRec (was unused)
  762.  
  763. fmOutCurStyle     EQU         17                        ;style algorthmically applied by QuickDraw
  764.  
  765. ;___________________________________________________________________________
  766. ;
  767. ; Window Manager
  768.  
  769. ; auxWinRec structure
  770.  
  771. awNext            EQU         $0                        ;next in chain [Handle]
  772. awOwner           EQU         $4                        ;owner ID [WindowPtr]
  773. awCTable          EQU         $8                        ;color table [CTabHandle]
  774. dialogCItem       EQU         $C                        ;handle to dialog manager structures [handle]
  775. awFlags           EQU         $10                       ;handle for Ernie [handle]
  776. awResrv           EQU         $14                       ;for expansion [longint]
  777. awRefCon          EQU         $18                       ;user constant [longint]
  778. auxWinSize        EQU         $1C                       ;size of record
  779. AuxWinHead        EQU         $0CD0                     ;[handle] Window Aux List head
  780.  
  781. ; Window Part Identifiers which correlate color table entries with window elements
  782.  
  783. wContentColor     EQU         0
  784. wFrameColor       EQU         1
  785. wTextColor        EQU         2
  786. wHiliteColor      EQU         3
  787. wTitleBarColor    EQU         4
  788.  
  789.  
  790. ;___________________________________________________________________________
  791. ;
  792. ; Control Manager
  793.  
  794. ; auxCtlRec structure
  795.  
  796. acNext            EQU         $0                        ;next in chain [AuxCtlHndl]
  797. acOwner           EQU         $4                        ;owner ID [ControlHandle]
  798. acCTable          EQU         $8                        ;color table [CCTabHandle]
  799. acFlags           EQU         $C                        ;misc flag byte [word]
  800. acReserved        EQU         $E                        ;for expansion [LONGINT]
  801. acRefCon          EQU         $12                       ;user constant [LONGINT]
  802. acSize            EQU         $16                       ;size of record
  803. AuxCtlHead        EQU         $0CD4                     ;[handle] Control Aux List head
  804.  
  805. ; Here are some equates for the colors of control parts
  806.  
  807. cFrameColor       EQU         0
  808. cBodyColor        EQU         1
  809. cTextColor        EQU         2
  810. cThumbColor       EQU         3
  811.  
  812. ;___________________________________________________________________________
  813. ;
  814. ; Menu Manager
  815.  
  816. MenuDisable       EQU         $0B54                     ; menuID and Item when disabled item selected
  817. MBDFHndl          EQU         $0B58                     ; handle to current menu bar defproc
  818. MBSaveLoc         EQU         $0B5C                     ; handle to the mbarproc private data
  819. MenuCInfo         EQU         $0D50                     ; hanel to menu color information table
  820. TopMenuItem       EQU         $A0A                      ; pixel value of top of scrollable menu
  821. AtMenuBottom      EQU         $A0C                      ; pixel value of bottom of scrollable menu
  822.  
  823. ;
  824. ; color menu table equates (mct = menu color table)
  825. ;
  826. mctID             EQU         $0
  827. mctItem           EQU         $2
  828. mctRGB1           EQU         $4
  829. mctRGB2           EQU         $A
  830. mctRGB3           EQU         $10
  831. mctRGB4           EQU         $16
  832. mctReserved       EQU         $1C
  833. mctEntrySize      EQU         $1E
  834.  
  835. ;
  836. ; miscellaneous equates for hierarchical menus
  837. ;
  838.  
  839. hMenuCmd          EQU         $1B                       ; itemCmd == $1B ==> hierarchical menu for this item
  840. scriptMenuCmd     EQU         28                        ; itemCmd == $1C ==> item to be displayed in script font
  841. hierMenu          EQU         -1                        ; InsertMenu(handle, hierMenu), when beforeID ==
  842. ; hierMenu, the handle is inserted in the
  843. ; hierarchical menuList
  844. mPopUpMsg         EQU         3                         ; menu defProc messages - place yourself
  845. ; miscellaneous hierarchical equates
  846. ;
  847. hMenuMark         EQU         200                       ; '»' = menu character indicates item with hierarchical menu
  848.  
  849. ;
  850. ; miscellaneous menubar equates
  851. ;
  852. mbMenu1Loc        EQU         $A                        ; first menu is 10 pixels from left side of screen
  853. mctAllIds         EQU         -97                       ; search for all IDs for the given Item
  854.  
  855. ;
  856. ; color menu table search (and destroy) messages (mct = menu color table)
  857. ;
  858. mctAllItems       EQU         -98                       ; search for all Items for the given ID
  859. mctLastIDIndic    EQU         -99                       ; last entry in color table has this in ID field
  860.  
  861. ;___________________________________________________________________________
  862. ;
  863. ; Text Edit
  864.  
  865. ; Set/Replace style modes
  866.  
  867. fontBit           EQU         0                         ; set font
  868. faceBit           EQU         1                         ; set face
  869. sizeBit           EQU         2                         ; set size
  870. clrBit            EQU         3                         ; set color
  871. addSizeBit        EQU         4                         ; add size mode
  872. toglBit           EQU         5                         ;set faces in toggle mode
  873. ; TESetStyle/TEContinuousStyle modes
  874. doFont            EQU         $01
  875. doFace            EQU         2
  876. doSize            EQU         4
  877. doColor           EQU         8
  878. doAll             EQU         15                        ; set font/face/size/color
  879. addSize           EQU         16
  880. doToggle          EQU         32
  881. ; New internal dispatch table
  882. ; --offsets into TEDispatchRec
  883. EOLHook           EQU         0                         ; [ProcPtr] TEEOLHook
  884. DRAWHook          EQU         4                         ; [ProcPtr] TEWidthHook
  885. WIDTHHook         EQU         8                         ; [ProcPtr] TEDrawHook
  886. HITTESTHook       EQU         12                        ; [ProcPtr] TEHitTestHook
  887. nWIDTHHook        EQU            24                        ; [ProcPtr] nTEWidthHook    <6>
  888. TextWidthHook    EQU            28                        ; [ProcPtr] TETextWidthHook    <13>
  889. ; --selectors for TECustomHook
  890. IntEOLHook        EQU         0
  891. IntDrawHook       EQU         1
  892. IntWidthHook      EQU         2
  893. IntHitTestHook    EQU         3
  894. IntNWidthHook    EQU            6                        ; new version of WidthHook    <6>
  895. IntTextWidthHook    EQU        7                        ; new TextWidthHook            <13>
  896. teDispatchH       EQU         teRecBack                 ; new handle to internal dispatch record
  897. ; handle to style record
  898.  
  899. teStylesH         EQU         $4A                       ; replaces teFont/teFace
  900.  
  901. ; offsets into TEStyleRec
  902.  
  903. nRuns             EQU         $0                        ; [INTEGER] # of entries in styleStarts array
  904. nStyles           EQU         $2                        ; [INTEGER] # of distinct styles
  905. styleTab          EQU         $4                        ; [STHandle] handle to distinct styles
  906. lhTab             EQU         $8                        ; [LHHandle] handle to line heights
  907. teRefCon          EQU         $C                        ; [LONGINT] reserved
  908. nullStyle         EQU         $10                       ; [NullStHandle] to style set at null selection
  909. runs              EQU         $14                       ; array of styles
  910.  
  911. ; offsets into NullStRec
  912.  
  913. teReserved        EQU         0                         ; [LONGINT] reserved for future expansion
  914. nullScrap         EQU         4                         ; [StScrpHandle] handle to scrap style table.
  915. nullStSize        EQU         8
  916.  
  917. ; offsets into StyleRun array
  918.  
  919. startChar         EQU         0                         ; [INTEGER] offset into text to start of style
  920. styleIndex        EQU         2                         ; [INTEGER] style index
  921. stStartSize       EQU         4                         ; size of a styleStarts entry
  922.  
  923. ; offsets into STElement
  924.  
  925. stCount           EQU         0                         ; [INTEGER] # of times this style is used
  926. stHeight          EQU         2                         ; [INTEGER] line height
  927. stAscent          EQU         4                         ; [INTEGER] ascent
  928. stFont            EQU         6                         ; [INTEGER] font
  929. stFace            EQU         8                         ; [Style] face
  930. stSize            EQU         10                        ; [INTEGER] size
  931. stColor           EQU         12                        ; [RGBColor] color
  932. stRecSize         EQU         18                        ; size of a teStylesRec
  933.  
  934. ; offsets into TextStyle
  935.  
  936. tsFont            EQU         0                         ; [INTEGER] font
  937. tsFace            EQU         2                         ; [Style] face
  938. tsSize            EQU         4                         ; [INTEGER] size
  939. tsColor           EQU         6                         ; [RGBColor] color
  940. styleSize         EQU         12                        ; size of a StylRec
  941.  
  942. ; offsets into StScrpRec
  943.  
  944. scrpNStyles       EQU         0                         ; [INTEGER] # of styles in scrap
  945. scrpStyleTab      EQU         2                         ; [ScrpSTTable] start of scrap styles array
  946.  
  947. ; offsets into scrpSTElement
  948.  
  949. scrpStartChar     EQU         0                         ; [LONGINT] char where this style starts
  950. scrpHeight        EQU         4                         ; [INTEGER] line height
  951. scrpAscent        EQU         6                         ; [INTEGER] ascent
  952. scrpFont          EQU         8                         ; [INTEGER] font
  953. scrpFace          EQU         10                        ; [Style] face
  954. scrpSize          EQU         12                        ; [INTEGER] size
  955. scrpColor         EQU         14                        ; [RGBColor] color
  956. scrpRecSize       EQU         20                        ; size of a scrap record
  957.  
  958. teFAutoScr            EQU        0                        ; (00000001b)
  959. ; feature definitions for TEFeatureFlag
  960. teFTextBuffering     EQU     1                         ; (00000010b)
  961. teFOutlineHilite     EQU     2                         ; (00000100b)
  962. teFInlineInput          EQU        3                        ; (00001000b)
  963. teFUseTextServices    EQU        4                        ; (00010000b)
  964.  
  965. ; action for the new "bit (un)set" interface, TEFeatureFlag
  966. TEBitClear        EQU         0
  967. TEBitSet          EQU         1                         ; set the selector bit.
  968. TEBitTest         EQU         -1                        ; no change; just return the present value
  969.  
  970. ; constants for identifying the routine that called FindWord <5>
  971. teWordSelect     EQU            4                        ; clickExpand to select word
  972. teWordDrag         EQU            8                        ; clickExpand to drag new word
  973. teFromFind         EQU            12                        ; FindLine called it ($0C)
  974. teFromRecal         EQU            16                        ; RecalLines called it ($10)
  975.  
  976. ; constants for identifying DoText selectors
  977. teFind            Equ            0                        ; DoText called for searching
  978. teHighlight        Equ            1                        ; DoText called for highlighting
  979. teDraw            Equ            -1                        ; DoText called for drawing text
  980. teCaret            Equ            -2                        ; DoText called for drawing the caret
  981.  
  982. ; Text Edit Selectors:
  983.  
  984. teStylPaste      EQU         0
  985. teStylePaste      EQU         0
  986. teSetStyle        EQU         1
  987. teReplaceStyle    EQU         2
  988. teGetStyle        EQU         3
  989. getStylHandle    EQU         4
  990. getStyleHandle    EQU         4
  991. setStylHandle    EQU         5
  992. setStyleHandle    EQU         5
  993. getStylScrap     EQU         6
  994. getStyleScrap     EQU         6
  995. teStylInsert     EQU         7
  996. teStyleInsert     EQU         7
  997. teGetPoint        EQU         8
  998. teGetHeight       EQU         9
  999.  
  1000. teContinuousStyle EQU         10
  1001. setStylScrap     EQU         11
  1002. setStyleScrap     EQU         11
  1003. teCustomHook      EQU         12
  1004. teNumStyles       EQU         13
  1005. teFeatureFlag    EQU            14                        ; new for System 6.0.5/Script Systems 6.0.4 <1.5>
  1006.  
  1007.                   MACRO
  1008.                   _TEContinuousStyle
  1009.                   MOVE.W      #teContinuousStyle,-(SP)
  1010.                   DC.W        $A83D                     ; _TEDispatch
  1011.                   ENDM
  1012.  
  1013.                   MACRO
  1014.                   _SetStylScrap
  1015.                   MOVE.W      #setStylScrap,-(SP)
  1016.                   DC.W        $A83D                     ; _TEDispatch
  1017.                   ENDM
  1018.  
  1019.                   MACRO
  1020.                   _SetStyleScrap
  1021.                   MOVE.W      #setStyleScrap,-(SP)
  1022.                   DC.W        $A83D                     ; _TEDispatch
  1023.                   ENDM
  1024.  
  1025.                   MACRO
  1026.                   _TECustomHook
  1027.                   MOVE.W      #teCustomHook,-(SP)
  1028.                   DC.W        $A83D                     ; _TEDispatch
  1029.                   ENDM
  1030.  
  1031.                   MACRO
  1032.                   _TENumStyles
  1033.                   MOVE.W      #teNumStyles,-(SP)
  1034.                   DC.W        $A83D                     ; _TEDispatch
  1035.                   ENDM
  1036.  
  1037. ; new for System 6.0.5/Script Systems 6.0.4 <1.5>
  1038.                   MACRO
  1039.                   _TEFeatureFlag
  1040.                   MOVE.W      #teFeatureFlag,-(SP)
  1041.                   DC.W        $A83D                     ; _TEDispatch
  1042.                   ENDM
  1043.  
  1044.                    MACRO
  1045.                   _TEStylPaste
  1046.                   MOVE.W      #teStylPaste,-(SP)
  1047.                   DC.W        $A83D                     ; _TEDispatch
  1048.                   ENDM
  1049.  
  1050.                  MACRO
  1051.                   _TEStylePaste
  1052.                   MOVE.W      #teStylePaste,-(SP)
  1053.                   DC.W        $A83D                     ; _TEDispatch
  1054.                   ENDM
  1055.  
  1056.                   MACRO
  1057.                   _TESetStyle
  1058.                   MOVE.W      #teSetStyle,-(SP)
  1059.                   DC.W        $A83D                     ; _TEDispatch
  1060.                   ENDM
  1061.  
  1062.                   MACRO
  1063.                   _TEReplaceStyle
  1064.                   MOVE.W      #teReplaceStyle,-(SP)
  1065.                   DC.W        $A83D                     ; _TEDispatch
  1066.                   ENDM
  1067.  
  1068.                   MACRO
  1069.                   _TEGetStyle
  1070.                   MOVE.W      #teGetStyle,-(SP)
  1071.                   DC.W        $A83D                     ; _TEDispatch
  1072.                   ENDM
  1073.  
  1074.                    MACRO
  1075.                   _GetStylHandle
  1076.                   MOVE.W      #getStylHandle,-(SP)
  1077.                   DC.W        $A83D                     ; _TEDispatch
  1078.                   ENDM
  1079.  
  1080.                  MACRO
  1081.                   _GetStyleHandle
  1082.                   MOVE.W      #getStyleHandle,-(SP)
  1083.                   DC.W        $A83D                     ; _TEDispatch
  1084.                   ENDM
  1085.  
  1086.                   MACRO
  1087.                   _SetStylHandle
  1088.                   MOVE.W      #setStylHandle,-(SP)
  1089.                   DC.W        $A83D                     ; _TEDispatch
  1090.                   ENDM
  1091.  
  1092.                   MACRO
  1093.                   _SetStyleHandle
  1094.                   MOVE.W      #setStyleHandle,-(SP)
  1095.                   DC.W        $A83D                     ; _TEDispatch
  1096.                   ENDM
  1097.  
  1098.                    MACRO
  1099.                   _GetStylScrap
  1100.                   MOVE.W      #getStylScrap,-(SP)
  1101.                   DC.W        $A83D                     ; _TEDispatch
  1102.                   ENDM
  1103.  
  1104.                  MACRO
  1105.                   _GetStyleScrap
  1106.                   MOVE.W      #getStyleScrap,-(SP)
  1107.                   DC.W        $A83D                     ; _TEDispatch
  1108.                   ENDM
  1109.  
  1110.                   MACRO
  1111.                   _TEStylInsert
  1112.                   MOVE.W      #teStylInsert,-(SP)
  1113.                   DC.W        $A83D                     ; _TEDispatch
  1114.                   ENDM
  1115.  
  1116.                   MACRO
  1117.                   _TEStyleInsert
  1118.                   MOVE.W      #teStyleInsert,-(SP)
  1119.                   DC.W        $A83D                     ; _TEDispatch
  1120.                   ENDM
  1121.  
  1122.                   MACRO
  1123.                   _TEGetPoint
  1124.                   MOVE.W      #teGetPoint,-(SP)
  1125.                   DC.W        $A83D                     ; _TEDispatch
  1126.                   ENDM
  1127.  
  1128.                   MACRO
  1129.                   _TEGetHeight
  1130.                   MOVE.W      #teGetHeight,-(SP)
  1131.                   DC.W        $A83D                     ; _TEDispatch
  1132.                   ENDM
  1133.                 
  1134.                 MACRO
  1135.                 _AppendDITL
  1136.                 MOVE.W        #AppendDITL,-(SP)
  1137.                 MOVE.L        SP,A0
  1138.                 _CommToolboxDispatch
  1139.                 ADDA.W        #$2,SP                    ; Pop the Selector back off
  1140.                 ENDM
  1141.                 
  1142.                 MACRO
  1143.                 _CountDITL
  1144.                 MOVE.W        #CountDITL,-(SP)
  1145.                 MOVE.L        SP,A0
  1146.                 _CommToolboxDispatch
  1147.                 ADDA.W        #$2,SP                    ; Pop the Selector back off
  1148.                 ENDM
  1149.                 
  1150.                 MACRO
  1151.                 _ShortenDITL
  1152.                 MOVE.W        #ShortenDITL,-(SP)
  1153.                 MOVE.L        SP,A0
  1154.                 _CommToolboxDispatch
  1155.                 ADDA.W        #$2,SP                    ; Pop the Selector back off
  1156.                 ENDM
  1157.  
  1158.                   ENDIF
  1159.  
  1160.     ENDIF    ; ...already included